import request from '../utils/request'

export const LoginApi = ({ username, password }) => {
  return request({
    url: '/user/login',
    method: 'POST',
    data: {
      username,
      password
    }
  })
}
export const SearchApi = ({ cityid, area, subway, rentType, price, more, roomType, oriented, characteristic, floor, start, end }) => request({
  url: '/houses',
  method: 'GET',
  params: { cityid, area, subway, rentType, price, more, roomType, oriented, characteristic, floor, start, end }
})
export const HouseChaxunApi = (id) => {
  return request({
    url: '/houses/condition',
    method: 'GET',
    params: id
  })
}
export const LunBoApi = () => {
  return request({
    url: '/home/swiper',
    method: 'GET'
  })
}
export const ZuFangxzApi = ({ area }) => {
  return request({
    url: '/home/groups',
    method: 'GET',
    params: area
  })
}
